using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class QuestRequirment : MonoBehaviour
{
    public Text requirmentName;
    public Text requirmentProcess;

    private void Awake()
    {
        requirmentName = GetComponent<Text>();
        requirmentProcess = transform.GetChild(0).GetComponent<Text>();
    }

    
    public void SetupRequirement(string name, int amount, int currentAmount)
    {
        requirmentName.text= name;
        requirmentProcess.text = currentAmount.ToString() + " / " + amount.ToString();
    }

    public void SetupRequirement(string name, bool isFinished)
    {
        if (isFinished)
        {
            requirmentName.text = name;
            requirmentProcess.text = "完成";
            requirmentName.color=Color.gray;
            requirmentProcess.color=Color.gray;
        }
    }
}
